/* * @Author: luy_0  * @Date: 2020-03-31 16:23:49  * @Last Modified by:   luy_0  * @Last Modified time: 2020-03-31 16:23:49 
Define, implement, and test a set of integers, class Intset. Provide union(并), intersection(交), and symmetric difference(差) operations.
 */

#include "Intset.h"
#include <iostream>
using namespace std;

int main() {
	Intset* setA = new Intset();
	setA->insert(2);
	setA->insert(12);
	setA->insert(4);
	cout << "A:\t";
	setA->print();

	Intset* setB = new Intset();
	setB->insert(13);
	setB->insert(5);
	setB->insert(2);
	setB->insert(13);
	cout <<"B:\t";
	setB->print();

	Intset Unionset = setA->setUnion(*setB);
	Intset Interset = setA->setIntersection(*setB);
	Intset Defferset = setA->setDefference(*setB);
	cout << "Unionset:\t"; Unionset.print();
	cout << "Interset:\t"; Interset.print();
	cout << "Defferset:\t"; Defferset.print();

	return 0;
}